<!--{template admin/header.html}-->
<link href="{CSS_URL}/jquery/jquery.ajaxtree.css" rel="stylesheet" type="text/css" />
<script src="{JS_URL}/jquery/jquery.ajaxtree.js" type="text/javascript"></script>
<link href="{CSS_URL}/jquery/jquery.fileupload-ui.css" rel="stylesheet" type="text/css" />
<script src="{JS_URL}/jquery/fileupload/jquery.fileupload.js" type="text/javascript"></script>
<script src="{JS_URL}/jquery/fileupload/jquery.fileupload-ui.js" type="text/javascript"></script>
<script src="{JS_URL}/jquery/fileupload/jquery.fileupload-uix.js" type="text/javascript"></script>

<div id="main">
    <div id="shortcut">
        <a href="{APP_URL}/index.php/admin/index">返回首页</a> <span>&raquo;</span> <a href="{APP_URL}/index.php/{$m}/{$p}">区域管理</a>
    </div>
    <div id="content">
        <input type="hidden" id="product_id" value="{$product_id}" />
        <div id="tabs">
            <ul>
                <li><a href="#tabs-1" id="basic_link">基本信息</a></li>
                <li><a href="#tabs-2">详细描述</a></li>
                <li><a href="#tabs-3">其他信息</a></li>
                <li><a href="#tabs-4">商品属性</a></li>
                <li><a href="#tabs-5">商品相册</a></li>
                <!--<li><a href="#tabs-6">关联商品</a></li>
                <li><a href="#tabs-7">关联配件</a></li>
                <li><a href="#tabs-8">关联文章</a></li>-->
            </ul>

            <div id="tabs-1">
                <div id="category_container" class="category_container">

                    <div id="product_basic_tree" class="category_tree">
                        <div style="height:1px; margin-top:-1px;clear: both;overflow:hidden;"></div>
                    </div>

                    <div id="category_main" class="category_main">
                        <table width="100%" class="region" id="table_basic">
                            <tr height="30">
                                <td width="120" align="right">商品名称：</td>
                                <td><input type="text" id="product_name" name="product_name" style="width:200px;" value="{$product_basic['product_name']}" /><font color="#FF0033"> <b>*</b></font></td>
                            </tr>
                            <tr height="30">
                                <td width="120" align="right">商品货号：</td>
                                <td><input type="text" id="product_sn" name="product_sn" style="width:200px;" value="{$product_basic['product_sn']}" />如不输入，系统将自动生成货号</td>
                            </tr>
                            <tr height="30">
                                <td width="120" align="right">商品分类：</td>
                                <td>
                                    <input type="text" id="cat_name" style="width:200px;" readonly="readonly" value="{$category_list[$product_basic['cat_id']]['name']}" />
                                    <input type="hidden" id="cat_id" name="cat_id" value="{$product_basic['cat_id']}" readonly="readonly"/>
                                    <font color="#FF0033"> <b>*</b></font>
                                </td>
                            </tr>
                            <tr height="30">
                                <td width="120" align="right">商品品牌：</td>
                                <td>
                                    {$brand_select}
                                    <font color="#FF0033"> <b>*</b></font>
                                </td>
                            </tr>
                            <tr height="30">
                                <td width="120" align="right">本店售价：</td>
                                <td><input type="text" id="shop_price" name="shop_price" style="width:200px;" value="{$product_basic['shop_price']}" /><font color="#FF0033"> <b>*</b></font></td>
                            </tr>
                            <tr height="30">
                                <td width="120" align="right">市场售价：</td>
                                <td><input type="text" id="market_price" name="market_price" style="width:200px;" value="{$product_basic['market_price']}" /><font color="#FF0033"> <b>*</b></font></td>
                            </tr>
                            <tr height="30">
                                <td width="120" align="right"><input type="checkbox" id="is_promote" name="is_promote" value="Y" {if $product_basic['is_promote'] == 'Y'}checked="checked" {/if}/>促销价：</td>
                                <td><input type="text" id="promote_price" name="promote_price" style="width:200px;" value="{$product_basic['promote_price']}" {if $product_basic['is_promote'] != 'Y'}disabled="disabled"{/if}/><font color="#FF0033"> <b>*</b></font></td>
                            </tr>
                            <tr height="30">
                                <td width="120" align="right">促销日期：</td>
                                <td>
                                    <input type="text" id="promote_start_time" name="promote_start_time" style="width:90px;" {if $product_basic['is_promote'] != 'Y'}disabled="disabled" {/if}value="{echo $product_basic['promote_start_time'] ? date('Y-m-d',$product_basic['promote_start_time']) : ''}" />
                                     -
                                    <input type="text" id="promote_end_time" name="promote_end_time" style="width:90px;" {if $product_basic['is_promote'] != 'Y'}disabled="disabled" {/if}value="{echo $product_basic['promote_end_time'] ? date('Y-m-d',$product_basic['promote_end_time']) : ''}"/>
                                </td>
                            </tr>
                            <tr height="30">
                                <td width="120" align="right">上传商品图片：<br />
                                    <label>自动生成缩略图<input type="checkbox" id="is_auto_generate" name="is_auto_generate" value="Y" checked="checked"/></label>
                                </td>
                                <td>
                                    <input type="hidden" id="product_img" name="product_img" value="{$product_basic['product_img']}" />
                                    <form id="original_img_upload_form"class="file_upload" action="{APP_URL}/index.php/request/upload/create_thumbnail/true/max_width/155/max_height/178/dir/product" method="POST" enctype="multipart/form-data">
                                        <input type="file" name="file[]" multiple />
                                        <button>Upload</button>
                                        <div class="file_upload_label">选择文件</div>
                                    </form>
                                    <table id="original_img_upload"></table>
                                </td>
                            </tr>
                            <tr height="30"  style="display:none" id="thumb_img_upload_tr">
                                <td width="120" align="right">
                                    上传商品缩略图：
                                </td>
                                <td>
                                    <input type="hidden" id="product_thumb" name="product_thumb" value="{$product_basic['product_thumb']}" />
                                    <form id="thumb_img_upload_form" class="file_upload" action="{APP_URL}/index.php/request/upload/create_thumbnail/false/dir/product" method="POST" enctype="multipart/form-data">
                                        <input type="file" name="file[]" multiple/>
                                        <button>Upload</button>
                                        <div class="file_upload_label">选择文件</div>
                                    </form>
                                    <table id="thumb_img_upload"></table>
                                </td>
                            </tr>
                            <tr height="30">
                                <td width="120" align="right">加入推荐：</td>
                                <td>
                                    <label><input type="checkbox" id="is_new" name="is_new" value="Y" {if $product_basic['is_new'] != 'N'}checked="checked" {/if}/>新品</label>
                                    <label><input type="checkbox" id="is_best" name="is_best" value="Y" {if $product_basic['is_best'] == 'Y'}checked="checked" {/if}/>精品</label>
                                    <label><input type="checkbox" id="is_hot" name="is_hot" value="Y" {if $product_basic['is_hot'] == 'Y'}checked="checked" {/if}/>热销</label>
                                </td>
                            </tr>
                            <tr height="30">
                                <td width="120" align="right">上架：</td>
                                <td>
                                    <label><input type="checkbox" id="is_on_sale" name="is_on_sale" value="Y" {if $product_basic['is_on_sale'] != 'N'}checked="checked" {/if}/>打勾表示允许销售，否则不允许销售。</label>
                                </td>
                            </tr>
                            <tr height="30">
                                <td width="120" align="right">能作为普通商品销售：</td>
                                <td>
                                    <label><input type="checkbox" id="is_alone_sale" name="is_alone_sale" value="Y" {if $product_basic['is_alone_sale'] != 'N'}checked="checked" {/if}/>打勾表示能作为普通商品销售，否则只能作为配件或赠品销售。</label>
                                </td>
                            </tr>
                            <tr height="30">
                                <td width="120" align="right">是否为免运费商品：</td>
                                <td>
                                    <label><input type="checkbox" id="is_shipping" name="is_shipping" value="Y" {if $product_basic['is_shipping'] == 'Y'}checked="checked" {/if}/>打勾表示此商品不会产生运费花销，否则按照正常运费计算。</label>
                                </td>
                            </tr>
                            <tr height="30">
                                <td width="120" align="right">商品简单描述：</td>
                                <td><input type="text" id="product_desc" name="product_desc" style="width:200px;"  value="{$product_basic['product_desc']}" /></td>
                            </tr>
                            <tr height="40">
                                <td width="80">&nbsp;</td>
                                <td>
                                    <input type="button" id="save_basic" value="保存" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
            <div id="tabs-2">
                <table width="100%" class="region">
                    <tr height="30" >
                        <td width="120" colspan="2" align="center">{echo $CKEditor->editor('detail_desc',$product_desc['content'])}</td>
                    </tr>
                    <tr height="40">
                        <td colspan="2" align="center"><input type="button" id="save_desc" value="保存" /></td>
                    </tr>
                </table>
            </div>

            <div id="tabs-3">
                <table id="table_info">
                    <tr height="30">
                        <td width="120" align="right">会员价格：</td>
                        <td><input type="text" id="member_price" name="member_price" style="width:200px;" value="{$product_info['member_price']}" />会员价格为0时表示会员价格按会员等级折扣率计算</td>
                    </tr>
                    <tr height="30">
                        <td width="120" align="right">商品优惠价格：</td>
                        <td>
                            优惠数量:<input type="text" id="preferential_num" name="preferential_num" style="width:100px;" value="{$product_info['preferential_num']}" />
                            优惠价格:<input type="text" id="preferential_price" name="preferential_price" style="width:100px;" value="{$product_info['preferential_price']}" />
                        </td>
                    </tr>
                    <tr height="30">
                        <td width="120" align="right">赠送消费积分数：</td>
                        <td><input type="text" id="give_integral" name="give_integral" style="width:200px;" value="{$product_info['give_integral']}" />购买该商品时赠送消费积分数,0表示按商品价格赠送</td>
                    </tr>
                    <tr height="30">
                        <td width="120" align="right">赠送等级积分数：</td>
                        <td><input type="text" id="rank_integral" name="rank_integral" style="width:200px;" value="{$product_info['rank_integral']}" />购买该商品时赠送等级积分数,0表示按商品价格赠送</td>
                    </tr>
                    <tr height="30">
                        <td width="120" align="right">积分购买金额：</td>
                        <td><input type="text" id="integral" name="integral" style="width:200px;" value="{$product_info['integral']}" />(此处需填写金额)购买该商品时最多可以使用积分的金额</td>
                    </tr>
                    <tr height="30">
                        <td width="120" align="right">商品重量：</td>
                        <td><input type="text" id="weight" name="weight" style="width:200px;" value="{$product_info['weight']}" />克</td>
                    </tr>
                    <tr height="30">
                        <td width="120" align="right">商品库存数量：</td>
                        <td><input type="text" id="nums" name="nums" style="width:200px;" value="{$product_info['nums']}" /></td>
                    </tr>
                    <tr height="30">
                        <td width="120" align="right">库存警告数量：</td>
                        <td><input type="text" id="warn_nums" name="warn_nums" style="width:200px;" value="{$product_info['warn_nums']}" /></td>
                    </tr>
                    <tr height="30">
                        <td width="120" align="right">商品关键词：</td>
                        <td><input type="text" id="keywords" name="keywords" style="width:200px;" value="{$product_info['keywords']}" />用空格分隔</td>
                    </tr>
                    <tr height="30">
                        <td width="120" align="right">商家备注：</td>
                        <td><input type="text" id="seller_note" name="seller_note" style="width:200px;" value="{$product_info['seller_note']}" /></td>
                    </tr>
                    <tr height="40">
                        <td width="80">&nbsp;</td>
                        <td>
                            <input type="button" id="save_info" value="保存" />
                        </td>
                    </tr>
                </table>
            </div>
            <div id="tabs-4">
                <table>
                    <tr>
                        <td>尺码</td>
                        <td>号型（身高/胸围）</td>
                        <td>肩宽</td>
                        <td>胸围</td>
                        <td>后衣长</td>
                        <td>袖长</td>
                    </tr>
                    <tr>
                        <td>XS</td>
                        <td>155/76A</td>
                        <td>35</td>
                        <td>75</td>
                        <td>56</td>
                        <td>11.5</td>
                    </tr>
                    <tr>
                        <td>S</td>
                        <td>160/80A</td>
                        <td>36</td>
                        <td>79</td>
                        <td>58</td>
                        <td>12</td>
                    </tr>
                    <tr>
                        <td>M</td>
                        <td>165/84A</td>
                        <td>37</td>
                        <td>83</td>
                        <td>60</td>
                        <td>12.5</td>
                    </tr>
                    <tr>
                        <td>L</td>
                        <td>170/88A</td>
                        <td>38</td>
                        <td>87</td>
                        <td>62</td>
                        <td>13</td>
                    </tr>
                    <tr>
                        <td>XL</td>
                        <td>175/92A</td>
                        <td>39</td>
                        <td>91</td>
                        <td>64</td>
                        <td>13.5</td>
                    </tr>
                    <tr height="40">
                        <td width="80">&nbsp;</td>
                        <td>
                            <input type="button" id="save_property" value="保存" />
                        </td>
                    </tr>
                </table>
            </div>
            <div id="tabs-5">
                <div id="get_gallery_list"></div>
                <table>
                    <tr height="30">
                        <td width="120" align="right">上传图片：</td>
                        <td width="120">
                            <input type="hidden" id="gallery_img" name="gallery_img" />
                            <input type="hidden" id="gallery_thumb" name="gallery_thumb" />
                            <form id="gallery_img_upload_form" class="file_upload" action="{APP_URL}/index.php/request/upload/create_thumbnail/true/max_width/70/max_height/75/dir/product" method="POST" enctype="multipart/form-data">
                                <input type="file" name="file[]" multiple/>
                                <button>Upload</button>
                                <div class="file_upload_label">选择文件</div>
                            </form>
                            <table id="gallery_img_upload"></table>
                        </td>
                        <td width="240">
                            图片描述：
                            <input type="text" id="gallery_img_desc" name="gallery_img_desc" />
                        </td>
                        <td width="120">
                            <input type="button" id="save_gallery" value="提交" />
                        </td>
                    </tr>
                </table>
            </div>
            <!--<div id="tabs-6">
                <div class="category_container">

                    <div id="assoc_product" class="category_tree">
                        <div style="height:1px; margin-top:-1px;clear: both;overflow:hidden;"></div>
                    </div>

                    <div class="category_main">
                        <table width="100%" class="region" id="table_assoc_product">
                            <tr height="40">
                                <td width="80">可选商品</td>
                                <td>操作</td>
                                <td width="80">已关联商品</td>
                            </tr>
                            <tr height="40">
                                <td width="80">
                                    <select id="product_list">

                                    </select>
                                </td>
                                <td>
                                    <input type="button" id="save_basic" value="关联>>" /><br />
                                    <input type="button" id="save_basic" value="<<撤销" />
                                </td>
                                <td width="80">
                                    <select id="assoc_product">
                                        
                                    </select>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
            <div id="tabs-7">
                <div class="category_container">

                    <div id="assoc_accessory" class="category_tree">
                        <div style="height:1px; margin-top:-1px;clear: both;overflow:hidden;"></div>
                    </div>

                    <div class="category_main">
                        <table width="100%" class="region" id="table_assoc_accessory">
                            <tr height="40">
                                <td width="80">&nbsp;</td>
                                <td>
                                    <input type="button" id="save_basic" value="关联" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
            <div id="tabs-8">
                <div class="category_container">

                    <div id="assoc_article" class="category_tree">
                        <div style="height:1px; margin-top:-1px;clear: both;overflow:hidden;"></div>
                    </div>

                    <div class="category_main">
                        <table width="100%" class="region" id="table_assoc_article">
                            <tr height="40">
                                <td width="80">&nbsp;</td>
                                <td>
                                    <input type="button" id="save_basic" value="关联" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>-->
        </div>
    </div>
</div>

<!--{template admin/footer.html}-->